(def BirthPos (vec3 30.0 0.0 30.0))

(def-trigger "游戏初始化"
   [(def-event "GameLoad")]
   (def-actions
     (action create-starting-units)
     ;锁定摄像机到本地玩家的主单位
     (action lock-camera-to-unit (localplayer) (player-main-unit (localplayer)) (vec3 0.0 91.07 -104.7))
    )
)

(def-trigger "单位死亡"
  [(def-event "UnitDie")]
  (== (unit-flag (trigger-unit) "Hero") true)
  (def-actions
    (action log "单位死亡 干死卡鲁宾")
    (action wait 5.0)                 ;等待5秒
    (action revive-unit (trigger-unit)) ;复活单位
    (action move-unit (trigger-unit) BirthPos)       ;移动到出生点
    (action log "卡鲁宾又活了 继续干")
  )
)
